import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';

import '../../main.dart';
import 'CourseStudyModel.dart';

class PublishRemarkViewModel extends ChangeNotifier{
  String _videoAdr="http://vfx.mtime.cn/Video/2019/02/04/mp4/190204084208765161.mp4";

  String get videoAdr{
    return this._videoAdr;
  }

  void setVideoAdr(String val){
    this._videoAdr=val;
    notifyListeners();
  }

  void publishRemark(int score,int couId,String stuId,String content,int a,int b,int c,int d,int e) async {
    Response result = await insertRemark(score,couId, stuId, content, a, b, c, d, e);//连接model
    print("###"+result.toString());
    if(result.data["code"]==1){
      EasyLoading.showSuccess(result.data["msg"]);
      Navigator.of(navigatorKey.currentContext).pop();
    }
    else
      EasyLoading.showError(result.data["msg"]);
  }
}



